{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "b4c65a82",
   "metadata": {},
   "source": [
    "### 本周学习目标\n",
    "\n",
    "#### 1.课本代码（项目一，从奇数中选择对应的时间节点)\n",
    "\n",
    "#### 2.认识变量\n",
    "\n",
    "#### 3.if else\n",
    "\n",
    "### 4.for+range\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b7552d97",
   "metadata": {},
   "source": [
    "### 课本代码\n",
    "遇到tab键空格，则该变量后的为语句子模块"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "260d920a",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 从Python基础库（标准库中）找到datetime模块\n",
    "from datetime import datetime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "56e4e6e7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "datetime.datetime(2021, 9, 6, 11, 16, 29, 25774)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "datetime.today()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "17d36e9a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Not an odd minute.\n"
     ]
    }
   ],
   "source": [
    "#1.课本代码（项目一，从奇数中选择对应的时间节点)\n",
    "\n",
    "from datetime import datetime\n",
    "\n",
    "odds = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29]\n",
    "\n",
    "right_this_minute = datetime.today().minute\n",
    "\n",
    "if right_this_minute in odds:\n",
    "    print(\"时间是奇数，时间在odds的数据中\")\n",
    "else:\n",
    "    print(\"Not an odd minute.\")\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "38884bf1",
   "metadata": {},
   "source": [
    "### 认识变量\n",
    "### 双引号括起来为字符串\n",
    "### \\加符号提示为一个符号，如：\\’\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "2a75bed7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "2 + 2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "149720eb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "20"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "50 - 5*6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "f0c23eb8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5.0"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(50 - 5*6) / 4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "1dd205e4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"doesn't\""
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    " 'doesn\\'t'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "e2a168d6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"doesn't\""
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    " \"doesn\\'t\""
   ]
  },
  {
   "cell_type": "markdown",
   "id": "34714ab1",
   "metadata": {},
   "source": [
    "* type（）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "0c312f27",
   "metadata": {},
   "outputs": [],
   "source": [
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "430ab2de",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "eef39feb",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1897459a",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c2e7fe73",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
